import {
    DIC
} from '@/const/dic';
import {
    timeFormatter
} from '../formatter';
import Store from '../../store/';
const allPermission = Store.state.user.permission;
const isAdmin = Store.state.user.userInfo.superAdmin;
export const userOrderItemTableOption = {
    border: true,
    index: true,
    selection: true,
    calcHeight: 350,
    columnBtn: false,
    searchClearable: false,
    selectClearBtn: false,
    searchResetBtn: false,
    height: "auto",
    menu: true,
    menuAlign: "center",
    searchBtn: true,
    labelWidth: 120,
    refreshBtn: true,
    tip: false,
    addBtn: false,
    dialogWidth: '800px',
    dialogHeight: 'auto',
    menuWidth: 180,
    editBtn: false,
    viewBtn: false,
    delBtn: false,
    column: [{
            "label": "商品名称",
            "prop": "title",
            "search": false,
            "type": "select",
            "fixed": true,
            "width": 200,
            "row": false,
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请选择商品",
                "trigger": "blur"
            }]
        },
        {
            "label": "封面",
            "prop": "cover",
            "search": false,
            "type": "upload",
            "fixed": false,
            "width": "auto",
            "row": true,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "listType": "picture-img",
            "showFileList": false,
            "imgHeight": 60,
            "imgWidth": "auto",
            "action": "/upload/image",
            "tip": "只能上传jpg/png文件，且不超过500kb",
            "rules": [{
                "required": true,
                "message": "请输入封面",
                "trigger": "blur"
            }]
        },
        {
            "label": "状态",
            "prop": "status",
            "search": true,
            "type": "tag",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请选择状态",
                "trigger": "blur"
            }],
            "placeholder": "请选择状态",
            "dicData": DIC["userOrderstatusDic"]
        },
        {
            "label": "价格",
            "prop": "price",
            "search": false,
            "type": "number",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请输入价格",
                "trigger": "blur"
            }]
        },
        {
            "label": "数量",
            "prop": "num",
            "search": false,
            "type": "number",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "80",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请输入数量",
                "trigger": "blur"
            }]
        },
        {
            "label": "订单号",
            "prop": "order_no",
            "search": false,
            "type": "select",
            "fixed": false,
            "width": 180,
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请选择订单号id",
                "trigger": "blur"
            }]
        },
        {
            "label": "下单时间",
            "prop": "create_time",
            "search": false,
            "type": "datetime",
            "fixed": false,
            "width": "160",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        },
        {
            "label": "收货人",
            "prop": "receiver",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "120",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        },
        {
            "label": "收货人地址",
            "prop": "receiver_address",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "180",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        },
        {
            "label": "收货人电话",
            "prop": "receiver_telephone",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "120",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        },

        {
            "label": "分享购买",
            "prop": "is_share_buy",
            "search": false,
            "type": "tag",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "dicData": DIC["YesNo"],
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请输入分享购买",
                "trigger": "blur"
            }]
        },
        {
            "label": "快递单号",
            "prop": "express_no",
            "search": true,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请输入快递单号",
                "trigger": "blur"
            }]
        },
        {
            "label": "快递公司",
            "prop": "express_com_name",
            "search": false,
            "type": "select",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请选择快递公司",
                "trigger": "blur"
            }]
        },
        {
            "label": "发货时间",
            "prop": "send_time",
            "search": false,
            "type": "datetime",
            "fixed": false,
            "width": "160",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false
        },
        {
            "label": "签收时间",
            "prop": "sign_time",
            "search": false,
            "type": "datetime",
            "fixed": false,
            "width": "160",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false
        },
        {
            "label": "参与活动",
            "prop": "activity_name",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [{
                "required": true,
                "message": "请选择参与活动",
                "trigger": "blur"
            }]
        },
        {
            "label": "完成时间",
            "prop": "done_time",
            "search": false,
            "type": "datetime",
            "fixed": false,
            "width": "160",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false
        }
    ]
};
